#include "MessageBuilder.h"

using Networking::MessageBuilder;

MessageBuilder::MessageBuilder()
{
}

QString MessageBuilder::createMessage(CommandPtr command) const
{
    QString message(Messaging::MessageHeaders[command->Type()]);
    QString param;
    foreach(param, command->Params()->ToList())
    {
         message += Messaging::DelimeterSequence + param;
    }
    message += Messaging::EOMSequence;

    return message;
}
